﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJ.WebApi.Abstractions;


public interface IWebApi
{
}

public interface IWebApiHandler : IWebApi
{
    Task ExecuteAsync();
}
public interface IWebApiRouteHandler<TRoute> : IWebApi
{
    Task ExecuteAsync(TRoute route);
}

public interface IWebApiRequestHandler<TRequest> : IWebApi 
    where TRequest : new()
{
    Task ExecuteAsync(TRequest request);
}

public interface IWebApiResponseHandler<TResponse> : IWebApi
    where TResponse : new()
{
    Task<TResponse> ExecuteAsync();
}

public interface IWebApiRouteRequestHandler<TRoute, TRequest> : IWebApi
    where TRequest : new()
{
    Task ExecuteAsync(TRoute route, TRequest request);
}

public interface IWebApiRouteResponseHandler<TRoute, TResponse> : IWebApi
    where TResponse : new()
{
    Task<TResponse> ExecuteAsync(TRoute route);
}
public interface IWebApiRequestResponseHandler<TRequest, TResponse> : IWebApi
    where TRequest : new()
    where TResponse : new()
{
    Task<TResponse> ExecuteAsync(TRequest request);
}
public interface IWebApiRouteRequestResponseHandler<TRoute, TRequest, TResponse> : IWebApi
    where TRequest : new()
    where TResponse : new()
{
    Task<TResponse> ExecuteAsync(TRoute route,TRequest request);
}